<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta name="ENimo Luo" content="May 11, 2010" />
<title>JavaScript调试机-ENimo</title>
<script  type="text/javascript" src="any v1.2.js" ></script>
<style>
a {font-size:12px};
div {
/* background:#FF4C00; */
display:block;
width:100px;
height:20px;
} 
.new{
float:left;
background:#ccc;
width:100px;
height:100px;
}
.enimo{
float:left;
background:blue;
width:100px;
height:100px;
}
#inf {
width:100px;
height:100px;
background:#ff8c00;
border:1px solid #ccc;
}
#inf2 {
width:100px;
height:20px;
border:1px solid #ccc;
}
</style>
<script type="text/javascript">

 
</script>
</head>
<body id="body">
<div id="btn"  style="width:100px;height:100px;background:red;">btn</div>
	<div class="block"></div> 
	<input type="button" id="in" value="in" />
	<input type="button" id="out" value="out" />
	<input type="button" id="tog" value="tog" />
	<input type="button" id="get" value="get" />
	<input type="button" id="set" value="set" />
	<input type="button" id="create" value="create" />
	<input type="button" id="remove" value="remove" />


	<input type="text" id="num" value="10" />
	<input type="text" id="cid" value="inf" />
	<input type="button" id="foutwhat" value="foutwhat" />
	<input type="button" id="finwhat" value="finwhat" />
	<input type="hidden" id="hiddenval" value="1" />
	<div id="inf" title="inf title">inf</div>
	<div id="inf2">inf2</div>
	<div id="text">DIV3-TEXT</div>
	<div id="div1" style="width:300px;height:248px;overflow:hidden">
  <a href="/javascript:">1,你可曾有过无数的梦想，</a>
  <a href="/javascript:">2,却在时光的流逝里幻灭 </a>
  <a href="/javascript:">3,你可曾对未来期待憧憬，</a>
  <a href="/javascript:">4,却在成长的岁月中迷失</a>
	</div> 
<script type="text/javascript">


//$$("go").onclick=function(){this.hide();alert("btn");}

//$2("inf").onclick=function(){this.hide();alert("btn");}
/* $("in").onclick=function(){
alert("d");
//$("btn").show();
} */

/* $("in").msover(function(){
//alert("d");
$("btn").show().cs("color","blue");
$("inf","inf2").cs("color","blue");
$("div1").hide();
$("btn").cs("opacity","0.3");
});
$("inf2","inf").dbclick(function(){
$("inf").cs("opacity","0.3");
});
$("inf2").msover(function(){
$("inf").cs("opacity","0.3");
});
$("inf2").msout(function(){
$("inf").cs("opacity","1");
});*/
//$("tog").toggle(function(){$("div1").hide();},function(){$("div1").show();});
$("tog").hov(function(){$("text").hide();},function(){$("text").show();}); 
$("inf").hov(function(){$("text").fout();},function(){$("text").fin();}); 
$("out").click(function(){$("btn").fout();});
$("in").click(function(){$("btn").fin();});
i=2;
$("tog").click(function(){$("num").set("value",i++);});

//完善
//1// 全局有效 //2 渐变 //3其他事件 如hover 4 ajax //5已经实现链式操作
var $$=function(){return (typeof arguments[0])=="string"?document.getElementById(arguments[0]):"null";}
//alert($$("inf").innerHTML); //ok
//alert($$("num").value); //ok
//alert($("num").get()); //ok
$("get").click(function(){alert($("num").get());});
$("set").click(function(){$("inf2","inf").set("h","6546456");});

$("create").click(function(){
var x=$().create("a");//alert(x);
 var y=$().create("span");
  var z=$().create("p");
  $("div1").apd(z);
//alert(typeof x);
$(x).set("title","enimo href a title");
$(x).set("id","enimo");
$(x).set("class","new2");
$(x).set("href","http://www.anymoore.com");
$(x).set("h","http://www.anymoore.com");

$(y).set("class","enimo");
$(y).set("id","enimo2");
$("div1").apd(x);
$("div1").ist(y);
});

$("remove").click(function(){
$("enimo").rmv();
$("enimo2").rmv();

});

$("foutwhat").click(function(){
$($("cid").get()).fout();

});
$("finwhat").click(function(){
$($("cid").get()).fin();

});

//alert($$("inf").getAttribute("title"));//ok
//alert(document.getElementsByTagName("num")[0].nodeValue);
//window.onload=run;
</script>
</body>
	</html>

